function gs
    git status --ignore-submodules
    read --nchars 1 -l v --prompt-str="Commit all?(y/N)?"
    if [ "$v" = "y" ]
        _ga
    end
end

function _ga
    set branch_name (git branch 2> /dev/null | grep \* | sed 's/* //')
    if [ "$branch_name" != "master" ]
        echo "is not master!!!"
        return
    end

    read -l msg --prompt-str="Commit msg:"

    git add -A :/
    if [ "$msg" = "" ]
      git commit --allow-empty-message -m ""
    else
      git commit -m "$msg"
    end
    git push -u origin master
end
